﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for NhanVien
/// </summary>
public class ENhanVien
{
    private int maNV;
    private string tenNV;
    private string soCMND;
    private string diaChi;
    private string soDienThoai;
    private string email;
    private string taiKhoan;
    public ENhanVien()
    { }
    public ENhanVien(int maNV, string tenNV, string soCMND, string diaChi, string soDienThoai, string email, string taiKhoan)
    {
        this.maNV = maNV;
        this.tenNV = tenNV;
        this.soCMND = soCMND;
        this.diaChi = diaChi;
        this.soDienThoai = soDienThoai;
        this.email = email;
        this.taiKhoan = taiKhoan;
    }
    public int MaNV
    {
        get { return this.maNV; }
        set
        {
            if (value == null)
                throw new Exception("maNV not allow nullvalue.");
            this.maNV = value;
        }
    }
    public string TenNV
    {
        get { return this.tenNV; }
        set
        {
            if (value == null)
                throw new Exception("tenNV not allow nullvalue.");
            this.tenNV = value;
        }
    }
    public string SoCMND
    {
        get { return this.soCMND; }
        set
        {
            if (value == null)
                throw new Exception("soCMND not allow nullvalue.");
            this.soCMND = value;
        }
    }
    public string DiaChi
    {
        get { return this.diaChi; }
        set { this.diaChi = value; }
    }
    public string SoDienThoai
    {
        get { return this.soDienThoai; }
        set { this.soDienThoai = value; }
    }
    public string Email
    {
        get { return this.email; }
        set { this.email = value; }
    }
    public string TaiKhoan
    {
        get { return this.taiKhoan; }
        set { this.taiKhoan = value; }
    }
    public override string ToString()
    {
        return this.maNV + "; " + this.tenNV + "; " + this.soCMND + "; " + this.diaChi + "; " + this.soDienThoai + "; " + this.email + "; " + this.taiKhoan + "; ";
    }
    public override bool Equals(Object obj)
    {
        ENhanVien me = (ENhanVien)obj;
        bool ret = this.MaNV.Equals(me.MaNV);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.MaNV.GetHashCode();
    }

}